import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.rsbot.script.methods.Mouse;
import org.rsbot.script.util.Timer;

final class VoluntaryThieve$Options
{
  private final boolean isBlackjacking;
  private final boolean isBanking;
  private final long maximumTime;
  private final int maximumPickpockets;
  private final int maximumLevels;
  private final boolean isDebugEnabled;

  private VoluntaryThieve$Options(Map<String, String> paramMap)
  {
    Object localObject;
    this.isBlackjacking = ((String)localObject.get("modeComboBox")).equals("Blackjack");
    this.isBanking = ((!this.isBlackjacking) && (Boolean.valueOf((String)localObject.get("getNewGlovesCheckBox")).booleanValue()));

    long l = 0L;
    String[] arrayOfString = { "maxHoursSpinner", "maxMinutesSpinner", "maxSecondsSpinner" };
    for (int i = 0; i < arrayOfString.length; i++)
      l = ()(l + Integer.parseInt((String)localObject.get(arrayOfString[i])) * 1000 * Math.pow(60.0D, 2 - i));
    this.maximumTime = l;

    this.maximumPickpockets = Integer.valueOf((String)localObject.get("maxPickpocketsSpinner")).intValue();
    this.maximumLevels = Integer.valueOf((String)localObject.get("maxLevelsSpinner")).intValue();

    if ((this.isDebugEnabled = Boolean.valueOf((String)localObject.get("enableDebugCheckBox")).booleanValue()))
      VoluntaryThieve.access$12200(paramMap).setLevel(Level.FINE);
    else VoluntaryThieve.access$12300(paramMap).setLevel(Level.CONFIG);

    VoluntaryThieve.access$12400(paramMap).setSpeed(5);
  }

  private void print()
  {
    int i = this.maximumTime > 0L ? 1 : 0; int j = this.maximumLevels > 0 ? 1 : 0;
    int k = this.maximumPickpockets > 0 ? 1 : 0;

    if ((i != 0) || (j != 0) || (k != 0)) {
      String str = i != 0 ? new StringBuilder().append("run a maximum ").append(Timer.format(this.maximumTime)).toString() : "";
      if (j != 0) str = new StringBuilder().append(str).append(str.length() > 0 ? " or " : "").append("gain ").append(this.maximumLevels).append(" levels").toString();

      if (k != 0) str = new StringBuilder().append(str).append(str.length() > 0 ? " or " : "").append("perform ").append(this.maximumPickpockets).append(VoluntaryThieve.access$800(this.this$0).isBlackjacking ? " loots" : " pickpockets").toString();

      VoluntaryThieve.access$12500(this.this$0).config(new StringBuilder().append("Will ").append(str).append(" before stopping.").toString());
    }

    VoluntaryThieve.access$12600(this.this$0).config(new StringBuilder().append(this.isBlackjacking ? "Blackjack" : "Pickpocket").append(" mode is enabled").append(this.isBanking ? " and will bank for new gloves." : ".").toString());

    if (this.isDebugEnabled) VoluntaryThieve.access$12700(this.this$0).config("Debug mode is enabled.");
  }
}